home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
lib
/
mntlib44.zoo
/
mntlib
/
abort.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-03-01
|
714b
|
38 lines
/* by ERS, modified by entropy */
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <mintbind.h>
#include "lib.h"
#ifndef SIGABRT
#define SIGABRT SIGIOT
#endif
extern int __mint;
__EXITING
abort()
{
#ifdef __MINT__
if (__mint)
{
(void) Pkill(Pgetpid(), SIGABRT);
/* process still alive, maybe SIGABRT was blocked */
(void) Psigsetmask(Psigblock(0) & ~(sigmask(SIGABRT)));
/* process still alive, maybe SIGABRT was ignored */
/* is this correct if user SIGABRT handler returns? */
(void) Psignal(SIGABRT, (long) SIG_DFL);
(void) Pkill(Pgetpid(), SIGABRT);
}
else
raise(SIGABRT);
_fclose_all_files();
_exit(127);
#else
raise(SIGABRT);
exit(127);
#endif
}